<!--<?php
print <<<EOT
-->

<script src="../css/edit.js"></script>
<script>
<!--

function isTrueTime(s) {

    var patrn=/^[\d]{4}-[\d]{2}-[\d]{2}\s[\d]{2}:[\d]{2}$/; 
	
	if (!patrn.exec(s)) {
    	return false;
	}
	
    return true;
} 

function validate(form) {

	if(form.subject.value.length < 2 || form.subject.value.length > 60) {
		showMsg('msg_area', 'Subject must be no more than 60 characters.');
		form.subject.focus();
		return false;
	}
    
	if(form.address.value.length > 100) {
		showMsg('msg_area', 'Address must be no more than 100 characters.');
		form.address.focus();
		return false;
	}
	
	if(!isTrueTime(form.online.value)) {
		showMsg('msg_area', 'Invalid online.');
		form.online.focus();
		return false;
	}
	
	if(!isTrueTime(form.offline.value)) {
		showMsg('msg_area', 'Invalid offline.');
		form.offline.focus();
		return false;
	}
	
	return true;
}

//-->
</script>

<!--Content Start-->
<table width="95%" border="0" align="center">
  <tr> 
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td>
      <table width="90%" border="0" align="left" cellpadding="3" cellspacing="3">
        <tr> 
          <td>
          
            <span id="msg_area" class="js_msg">$alert_message</span>
            
            <table border="0" cellspacing="0" cellpadding="0">
              
              <tr><td width="100%" height=20 colspan=2></tr>
            </table>
            
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td >
                  <table width="773" border="0" cellpadding="1" cellspacing="1">
                    <tr>
                    
                      <td width="75%">
                  <form name="form1" method="post" action="{$PHP_SELF}"  onsubmit="return validate_search(this, '$key')">                  
                 
                   <table width="100%" border="0" cellpadding="1" cellspacing="1">
                    <tr>
                    
                      <td width="550">                      
					  <strong>From:</strong>&nbsp; 
                    
                     
                      <label>
                      <select name="month1" class="text">
                        {$start_month_out}
                      </select>
                      </label> 
                      -
                      <label>
                      <select name="day1" class="text">
                        {$start_day_out}
                      </select>
                      </label>
                       - 
                      <label>
                      <select name="year1" class="text">
                        {$start_year_out}
                      </select>
                      </label> 
                      
                      <strong>To:</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  
                     
                      <label>
                      <select name="month2" class="text">
                        {$end_month_out}
                      </select>
                      </label> 
                      -
                      <label>
                      <select name="day2" class="text">
                        {$end_day_out}
                      </select>
                      </label>
                      
                       - 
                     <label>
                      <select name="year2" class="text">
                        {$end_year_out}
                      </select>
                      </label> 
                      
                      </td>
                      <td width="40"><input name="image" type="image" src="../images/admin/bt_search.gif" /> <input type="hidden" name="action" value="search"></td>
                    </tr>
                  </table>  
                  </form>   
                   </td>
                      
			       <td width="25%" valign="bottom" >                  
                    <form name="form2" method="post" action="{$PHP_SELF}" >                  
                    <input name="image" type="image" src="../images/admin/bt_listall.gif" />
                    <input type="hidden" name="action" value="listall" />  </form>
                    
                    </td>
                    </tr>
                  </table>
                
                  </td>
	          </tr>
            </table>
	      </td>
              </tr>
            </table>
            
            
            <span id="edit_area"></span>
            
            $page_show

            <table width="100%" border="0" cellspacing="1" cellpadding="1" class="tb">
              <tr class="tbheader" height="25"> 
		        <td width="10%">Date</td>
			    <td width="10%">Time</td>
			    <td width="15%">Name</td>
			    <td width="45%">Contact</td>
			    <td width="20%">Country</td>	
			    <!--<td width="20%">User From</td>	-->	    
              </tr>

<!--
EOT;
foreach($out_ary as $k=>$v){
print <<<EOT
-->
              
              <tr class="tbcontent1" height="48"> 
		        <td nowrap>&nbsp;{$v['date']}</td>
                <td>&nbsp;{$v['time']}</td>
                <td>&nbsp;<a href='./user_record.php?uid={$v["usid"]}'>{$v['name']}</a></td>
                <td>&nbsp;{$v['contact']}</td>
                <td>{$v['country']}</td>
             <!--   <td width="20%">{$v['From']}</td>-->
              </tr>

<!--
EOT;
} print <<<EOT
--> 
            </table>

            $page_show

          </td>
        </tr>
      </table>
      
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p></td>
  </tr>
</table>
<!--Content End-->

<!--
EOT;
?>-->